package cn.pro.wyn.jdbc;

public class APPTest {
    public static void main(String[] args){
        int i=0;
        //2.1 插入
        i=JdbcUtils.update("INSERT INTO `user` (username ,`PASSWORD`) VALUES ('wyn',741);");
        if(i>0){
            System.out.println("插入成功!");
        }
        //2.2修改
        i=JdbcUtils.update("UPDATE `user` SET `password` ='666' WHERE id =4");
        if(i>0){
            System.out.println("修改成功!");
        }
        //2.3删除
        i=JdbcUtils.update("DELETE FROM `user` WHERE id=3;");
        if(i>0){
            System.out.println("删除成功!");
        }
        //2.4查询
        JdbcUtils.select("select id,username from `user` order by id;");

    }
}
